package tianxiao.web.test;

import org.springframework.stereotype.Component;
import yun.web.springmvc.interceptor.Interceptor;
import yun.web.springmvc.interceptor.InterceptorResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;


/*------------------------
      author: 张天笑
      date: 2019/3/4
      time: 15:27
-------------------------*/
@Component
public class HelloInterceptor implements Interceptor {
    @Override
    public InterceptorResult intercept(HttpServletRequest req, HttpServletResponse resp, Object o, Method method, Object... args) throws Exception {
        System.out.println("------------ hello interceptor ------------");
        return new InterceptorResult(true, "我特么");
    }
}
